package com.liwq;

/**
 * @author : liwq
 * @version : 1.0
 * @date : 2022/11/15
 **/
public class Person {
    private String name;
    public Person(){}
    public Person(String name){this.name = name;}
    public String toString() {return "Person [name=" + name + "]";}

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    @FunctionalInterface
    interface PersonBuilder{
        Person build();
    }


    public static void print(PersonBuilder b,String name){
        Person person = b.build();
        System.out.println(person);
    }

    public static void main(String[] args) {
        print(Person::new,"尼古拉斯-赵四");
    }
}
